<template>
  
    <el-row class="box">
       <el-col :span="12">
          <div v-if="this.$store.state.islogin">
              <h3>{{this.$store.state.username}}</h3>

                <el-button native-type="button" type="warning" v-on:click="dologout">退出登录</el-button>
              </router-link>
          </div>
          <div v-else>
             <h3>欢迎来到闲鱼</h3>
             <router-link to="/">
                 <el-button native-type="button" type="warning">马上登录</el-button>
             </router-link>
          </div>    
       </el-col>

       <el-col :span="12">
           <div class="logo"></div>
       </el-col>
    </el-row>

</template>

<script>
   export default{
   	name:'woellnt',

    methods:{
      dologout(){
        this.$store.commit('dologout');
        this$router.push('/');
      }
    }
   }
</script>

<style scoped>
    .logo{
    	width: 125px;
    	height: 95px;
    	background-image: url("../assets/images/bb.png");
    	margin-top: 40px;
    }
</style>